chore: enforce ruff docstring rules in integrations 31-40 (openrouter, opensearch, optimum, paddleocr, pgvector, pinecone, pyversity, qdrant, ragas, snowflake)#3011
Conversation
…19) in integrations 31-40 Adds D102, D103, D205, D209, D213, D417, D419 ruff rules to pyproject.toml for: openrouter, opensearch, optimum, paddleocr, pgvector, pinecone, pyversity, qdrant, ragas, snowflake. Fixes all resulting docstring violations. Part of #2947 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ftest Pinecone's eventual consistency requires a delay after deletions before counts reflect the change. The conftest already wrapped delete_documents_async with a sleep, but missed delete_all_documents_async, causing a flaky test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bogdankostic
left a comment
There was a problem hiding this comment.
Looking good in principle! I just left two minor comments regarding a grammatical fix and docstring consistency within a file.
While reviewing, I was wondering: do we have a convention for the verb forms we use in our docstrings? I noticed we currently mix the third-person singular ("Creates a new OpenSearchDocumentStore instance.") and the imperative/infinitive ("Initialize the OpenSearchHybridRetriever...").
We're not as consistent as we could be and we're not enforcing this throughout the code base but convention is to follow https://developers.google.com/style/reference-verbs |
Co-authored-by: bogdankostic <bogdankostic@web.de>
Related Issues
Closes #2947
Part 4/5. Last open PR.
Proposed Changes:
pyproject.tomlfor 10 integrations: openrouter, opensearch, optimum, paddleocr, pgvector, pinecone, pyversity, qdrant, ragas, snowflakeruff --fix; D205/D102/D103 violations fixed with Claude Code"D"toexamples/**per-file-ignores where example directories existpyversityneeded no source code changes (onlypyproject.toml)delete_documents_asyncto sleep after deletion, butdelete_all_documents_asyncdid not have the wrapper yetHow did you test it?
Ran tests locally
Notes for the reviewer
This is batch 4 of the docstring rules enforcement. Previous batches: #3008, #3009, #3010.
I thought about adding D107, which is not mentioned in the issue. D107 checks that
__init__method definitions have docstrings. I could open one separate PR that adds D107 to all integrations and one PR to add it to Haystack if we agree its beneficial. For consistency it makes sense but there is not much value added but the__init__docstrings so it's not of importance.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.